﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using WPFExcelReport.Helpers;
using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class TXTITXBOX
    {
        #region ==TXTWIDTH===========
        public static readonly DependencyProperty TXTWIDTHProperty = DependencyProperty.Register("TXTWIDTH",
        typeof(double), typeof(TXTITXBOX),
        new FrameworkPropertyMetadata(300.0, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTXTWIDTHChanged));
        public double TXTWIDTH
        {
            get
            {
                return (double)GetValue(TXTWIDTHProperty);
            }
            set
            {
                SetValue(TXTWIDTHProperty, value);
            }
        }
        private static void OnTXTWIDTHChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            var src = sender as TXTITXBOX;
            if (src != null)
            {
                src.TXTWIDTH = (double)e.NewValue;
            }
        }
        #endregion
        #region ==TXTHIGHT===========
        public static readonly DependencyProperty TXTHIGHTProperty = DependencyProperty.Register("TXTHIGHT",
        typeof(double), typeof(TXTITXBOX),
        new FrameworkPropertyMetadata(300.0, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTXTHIGHTChanged));
        public double TXTHIGHT
        {
            get
            {
                return (double)GetValue(TXTHIGHTProperty);
            }
            set
            {
                SetValue(TXTHIGHTProperty, value);
            }
        }
        private static void OnTXTHIGHTChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            var src = sender as TXTITXBOX;
            if (src != null)
            {
                src.TXTHIGHT = (double)e.NewValue;
            }
        }
        #endregion
        public DataTable TBTXT
        {
            get
            {
                return cTXT.TBMain;
            }
        }
        public TXTITXBOX()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VTXTIND();
            DataContext = MV;
            InitializeComponent();
            TART = "ZAB";
        }
        public override void OnEdit()
        {
            base.OnEdit();
        }
    }
}
